﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using EHTWebsite.Code;
/// <summary>
/// Author toanvt
/// CreatedDate 07/12/2011
/// </summary>
public partial class Administrator_AdminIntroduce : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ThongTinCongTy theThongTinCongTy = ThongTinCongTyProvider.GetThongTinCongTy();

            if (theThongTinCongTy != null)
            {
                this.fckGoiThieuOther.Value = theThongTinCongTy.GioiThieuOther;
                this.fckGoiThieuVN.Value = theThongTinCongTy.GioiThieuVN;
                this.fckGioiThieuTomTatVN.Value = theThongTinCongTy.GioiThieuTomTatVN;
                this.fckGioiThieuTomTatOther.Value = theThongTinCongTy.GioiThieuTomTatOther;
            }
        }
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        String gioiThieuVN = this.fckGoiThieuVN.Value;
        String gioiThieuOther = this.fckGoiThieuOther.Value;
        String gioiThieuTomTatVN = this.fckGioiThieuTomTatVN.Value;
        String gioiThieuTomTatOther = this.fckGioiThieuTomTatOther.Value;

        ThongTinCongTyProvider.UpdateGioiThieu(gioiThieuVN, gioiThieuOther, gioiThieuTomTatVN, gioiThieuTomTatOther);
        ltrMessage.Text = "Cập nhật thành công";
    }

}